package com.siriframe.mq;

import com.siriframe.service.impl.RocketMQMessageSender;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
public class Producer {

    @Resource
    private RocketMQMessageSender rocketMQTemplate;

    @PostMapping("/sendSyncMessage")
    public void sendSyncMessage() throws Exception {
        rocketMQTemplate.send("test","hello rocketMQ");
    }
}
